﻿@model OKRs.Models.ObjectiveViewModels.ObjectiveViewModel

@{
    ViewData["Title"] = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<ol class="breadcrumb">
    <li><a asp-controller="Home" asp-action="Index">Home</a></li>
    <li><a asp-controller="Objective" asp-action="Index">Objectives</a></li>
</ol>

<h4 class="clearfix">
    <span class="pull-left">@Model.Title</span>
    <a class="btn btn-xs btn-default pull-right" asp-action="Edit" asp-route-id="@Model.Id">
        <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
        Edit
    </a>
</h4>

<div class="list-group">
    <div href="#" class="list-group-item active clearfix">
        <strong class="list-group-item-heading pull-left">Key Results</strong>
        <a class="btn btn-xs btn-primary pull-right" asp-controller="KeyResult" asp-action="Add" asp-route-objectiveId="@Model.Id">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
            Add Key Result
        </a>
    </div>
    @foreach (var keyResult in Model.KeyResults)
    {
        <a asp-controller="KeyResult" asp-action="Details" asp-route-objectiveId="@Model.Id" asp-route-keyResultId="@keyResult.Id" class="list-group-item">K: @keyResult.Description</a>
    }
</div>
